Font definition file format description
---------------------------------------

As of version 0.70, PatchROM supports Thingy tile tables, but you may
find it easier to work with PatchROM formatted font defintion files.

The format of a font definition file is fairly straight-forward.

First, the character ID appears (in brackets). This will be either a
one- or two- byte hex code (i.e. [00] or [3F25]). 

Then the text for the character appears (in quotes). This is optional for
special characters like end of string. When encoding PatchROM will scan
all of the text strings and find the longest match. This can be useful
for dual tile encoding or macro (substring) encoding.

Parameterized characters can be achieved by placing an '@' into the text
for a character. For example if [7C] was "<speed @>" and the next data in
the ROM was 7C 20 then the dumper would output "<speed 20>". Likewise, if
the inserter sees "<speed 3F>", it would encode to 7C 3F. 

Optionally, each character can have a second definition (in curly brackets).
These definitions are used when the second font is selected (d2, t2, ...).
This can be useful if you're modifying a ROM from one character set to
another. For example, you might put all your english characters in the
first font definition (quotes) and all your japanese characters in the
second font definition (curly brackets). Then you have one file with
definition for both fonts.

Finally, each character can have special command flags. Valid command
flags are:

   newline  - indicates a newline should be output after the text for the
              current character.
   terminal - indicates that the current string ends after this character
   byte     - indicates that a parameterized command has an additional
              byte parameter (in essence - a two byte parameter)

As with all PatchROM files, comments start with a semi-colon (;) and 
continue to the end of the line. Below is a sample font definition file:

   ; This is a sample font file
   ; Comments start with a semi-colon and run to the end of the line

   [00] terminal             ; 00 is the standard end of string code
   [01] " " { }              ; 01 is a space in both languages
   [02] "0" {0}              ; 02 is the zero character.

   [10] "a" {ka}             ; 10 is 'ka' in the japanese charset, but it has
                             ;   been replaced with 'a' for the english

   [70] "<data0>" {<data0>}  ; 70 is a special character to output unique
                             ;   data like player health. You could just as
                             ;   easily use [data0], %0, ^0#, or any other
                             ;   combination that doesn't include ", }, or @.
                             ;   The text converter will match the longest 
                             ;   string.

   [7C] "<speed @>" {<speed @>}; 7C is a special character which sets the
                             ;   message speed to the value of the next byte.
                             ;   the converter replaces the @ with the hex 
                             ;   value of the next byte. Ex: 7C08 would be
                             ;   converted to "<speed 08>". For double data bytes,
                             ;   append the special code 'byte' after the strings

   [7D] newline              ; 7D is the code to go to the next line

   [7E] "<pause>" {<pause>}  ; 7E is the code to pause the output when the
                             ;   text window is full, but does not end the
                             ;   current string.

   [7F] "<yesno>" {<yesno>} terminal ; 7F is the special character which
                             ;   activates the yes/no menu, and it also
                             ;   terminates the string; the next byte
                             ;   is actually the first byte of a new string.

   [3F00] "the" {mashita}    ; 3F00 is a macro for 'mashita', which has been
                             ;   replaced with 'the' for the english version.
                             ;   3F by itself is undefined, but if it were,
                             ;   the two-byte code would have precedence when
                             ;   dumping the text.
                             ;   NOTE: this does not change 'mashita' to 'the' 
                             ;   this is only for dumping/inserting

                             ; Notice that there is no file terminator, and
                             ;   you don't have to define every character. If
                             ;   a non-defined character is found when dumping
                             ;   text, the hexcode is output - [6E]

_______________

   This document was last updated 9/09/2000 by Brian Weiss  